package com.lm.batch.job;

import org.springframework.batch.item.ItemReader;

public class CustomerItemReader implements ItemReader<String> {

    private String[] data = {"1", "2", "3", "4", "5"};
    private int index = 0;
    @Override
    public String read() throws Exception {
        if (index < data.length) {
            return data[index++];
        }
        return null;  // 读取完成
    }
}
